package com.kawa.kemanage.controller.app;

import com.kawa.kemanage.service.NewsCategoryService;
import com.kawa.kemanage.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/app")
public class CategoryController {

    @Autowired
    private NewsCategoryService newsCategoryService;

    /**
     * 查询分类标签
     * @return
     */
    @RequestMapping("/categories")
    public Result categoryList(){
        return Result.success(newsCategoryService.categoryList());

    }

}
